-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new CLI feature: maintain battery in a certain range #261
base: main
Are you sure you want to change the base?
Conversation
* https://github.com/actuallymentor/battery: Fix bug Add files via upload cleared up logging message cleared up logging message added integer check for charge command argument
Thanks for the addition Seefood! If I read this correctly, the while loop has no throttling so would be running in very rapid succession. Was that a design decision? |
There's a 1 minute sleep there at the end of the while loop, so battery levels are sampled once a minute. Do you feel it should be more like 5 minutes? |
Hi, Just wanted to ask if PR is just waiting for the loop throttle/sleep fix or resolution? |
if [[ "$lower_threshold" -lt 1 ]] || [[ "$lower_threshold" -gt 100 ]] || | ||
[[ "$upper_threshold" -lt 1 ]] || [[ "$upper_threshold" -gt 100 ]] || | ||
[[ "$lower_threshold" -gt "$upper_threshold" ]]; then | ||
log "Error: $setting is not a valid range setting for battery maintain. The min/max value should between 1 and 100. A range example like 30-80" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The min/max value should be between 1 and 100.
Fix bug
Add files via upload
cleared up logging message
cleared up logging message
added integer check for charge command argument
Actually #227 by @tangb4c with some code improvements and inline comments